package com.wgo.precise.client.ui.model.facade;

import java.util.List;

import com.wgo.precise.client.ui.model.AbstractPropertySpesification;
import com.wgo.precise.client.ui.model.PropertyValue;

/**
 * @author petterei
 * @version $Id: IPropertiesContainer.java,v 1.1 2006-01-23 19:58:37 petterei Exp $
 */
public interface IPropertiesContainer {

	public void setPropertyDefaultValue(AbstractPropertySpesification spec);

	/**
	 * Method used for packages other than model.
	 * 
	 * @param spec The instance of the belonging PropertySpecification
	 * @param value The value, typically a string or int
	 */
	public boolean setPropertyValueFromCellEditor(
			AbstractPropertySpesification spec, Object value);

	public List<PropertyValue> getCurrentPropertyValues();

	public boolean isPropertySet(AbstractPropertySpesification definition);

	/**
	 * If the item has more than one value (typical previous values, kept for 
	 * history auditing) for a field (PropertySpecification), then this method 
	 * can be used to get the last value.
	 * 
	 * @param spec The instance of the assosiated AbstractPropertySpesification
	 * @return The corresponding PropertyValue
	 */
	public PropertyValue getCurrentPropertyValue(AbstractPropertySpesification spec);

}